import { createRouter, createWebHistory } from 'vue-router'


export const constantRoutes = [
    //重定向--一般设置为首页
    {
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        name: 'home',
        component: () => import('@/views/Home/Home.vue')
    },
    {
        path: '/about',
        name: 'about',
        component: () => import('../views/About/About.vue')
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes: [...constantRoutes]
})

export default router;
